package cn.ijero.pictureselector.data;

public class LocalMedia {
    private int id;
    private String data;
    private String mimeType;
    private int width;
    private int height;
    private long duration;
    private long size;
    private String bucketDisplayName;
    private String displayName;
    private long bucketId;
    private int orientation;
    private String longitude;
    private String latitude;
    private String datetime;

    public LocalMedia(int id, String data, String mimeType, int width, int height, long duration, long size, String bucketDisplayName, String displayName, long bucketId, int orientation) {
        this.id = id;
        this.data = data;
        this.mimeType = mimeType;
        this.width = width;
        this.height = height;
        this.duration = duration;
        this.size = size;
        this.bucketDisplayName = bucketDisplayName;
        this.displayName = displayName;
        this.bucketId = bucketId;
        this.orientation = orientation;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getMimeType() {
        return mimeType;
    }

    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public long getDuration() {
        return duration;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public String getBucketDisplayName() {
        return bucketDisplayName;
    }

    public void setBucketDisplayName(String bucketDisplayName) {
        this.bucketDisplayName = bucketDisplayName;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public long getBucketId() {
        return bucketId;
    }

    public void setBucketId(long bucketId) {
        this.bucketId = bucketId;
    }

    public int getOrientation() {
        return orientation;
    }

    public void setOrientation(int orientation) {
        this.orientation = orientation;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getDatetime() {
        return datetime;
    }

    public void setDatetime(String datetime) {
        this.datetime = datetime;
    }

    public boolean hasLocation() {
        return getLatitude() != null && !getLatitude().isEmpty() && getLongitude() != null && !getLongitude().isEmpty();
    }

    @Override
    public String toString() {
        return "LocalMedia{" +
                "id=" + id +
                ", data='" + data + '\'' +
                ", mimeType='" + mimeType + '\'' +
                ", width=" + width +
                ", height=" + height +
                ", duration=" + duration +
                ", size=" + size +
                ", bucketDisplayName='" + bucketDisplayName + '\'' +
                ", displayName='" + displayName + '\'' +
                ", bucketId=" + bucketId +
                ", orientation=" + orientation +
                ", longitude='" + longitude + '\'' +
                ", latitude='" + latitude + '\'' +
                ", datetime='" + datetime + '\'' +
                '}';
    }
}
